package com.framewiki.example.api;

import com.cdkjframework.exceptions.GlobalException;
import com.cdkjframework.util.tool.StringUtils;
import com.framewiki.example.dto.RmsUserDto;
import com.framewiki.example.service.RmsUserService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @ProjectName: com.lesmarthome.bms
 * @Package: com.lesmarthome.bms.api
 * @ClassName: ApiUserController
 * @Description: 用户接口
 * @Author: xiaLin
 * @Version: 1.0
 */

@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/bms/user/")
public class ApiRmsUserController {

  /**
   * 用户服务
   */
  private final RmsUserService rmsUserServiceImpl;

  /**
   * app 查询批量的账户信息
   *
   * @param userDto 条件
   * @return 账户信息
   */
  @PostMapping("/listRmsUser")
  @ResponseBody
  public List<RmsUserDto> listRmsUser(@RequestBody RmsUserDto userDto) {
    return rmsUserServiceImpl.listRmsUser(userDto);
  }
}
